<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="">
    <div class="col-sm-12">
        <div class="ibox">
            <form id="data_form"><!-- FORM提交数据用 -->
                <div class="ibox-title">
                    <div class="form-inline">
                        <div class="input-group col-md-2">
                            <span class="input-group-addon"><span style="color:red">*</span>店铺: </span>
                            <select data-placeholder="店铺" name="shopNo" id="shopNo" class="form-control" required>
                            </select>
                        </div>
                        <div class="input-group col-md-2">
                            <span class="input-group-addon"><span style="color:red">*</span>客户: </span>
                            <select data-placeholder="选择客户" name="consumerId" id="consumerId" class="form-control" required>
                                <option value="">请选择</option>
                            </select>
<!--                            <span class="input-group-btn"> <button type="button" class="btn btn-white" onclick="addHead()">...</button> </span>-->
                        </div>
                        <div class="input-group col-md-2">
                            <span class="input-group-addon"><span style="color:red">*</span>销售人员: </span>
                            <select data-placeholder="销售人员" name="billerId" id="billerId" class="form-control" required>
                            </select>
                        </div>
                        <div class="input-group date col-md-2">
                            <span class="input-group-addon"><span style="color:red">*</span>单据日期: </span>
                            <input  id="date_1" type="text" data-type="datepicker" name="billDate" class="form-control" autocomplete="off" required>
                        </div>
                        <input type="hidden" id="billNo" name="billNo" class="form-control">
                        <div class="input-group pull-right">
                            <span class="input-group-addon" name="billNo">单据编号:</span>
                        </div>
                        <input type="hidden" id="billSource" name="billSource" class="form-control">
                    </div>
                </div>

                <div class="ibox-content util-ibox-content">
                    <div class="jqGrid_wrapper">
                        <table id="table_list"></table>
                    </div>

                    <div id="mask"></div>

                    <div class="m-t-sm">
                        <textarea name="remark" class="form-control" placeholder="备注..."></textarea>
                    </div>

                    <div class="row m-t-sm">
                        <div class=" form-inline">
                            <div class="form-group col-md-3">
                                <label class="util-form-label">优惠率：</label>
                                <input type="number" placeholder="优惠率" id="discountRateTotal" name="discountRateTotal" class="form-control">
                                <span class="">%</span>
                            </div>
                            <div class="form-group col-md-3">
                                <label class="util-form-label">收款优惠：</label>
                                <input type="number" placeholder="收款优惠" id="discountAmountTotal" name="discountAmountTotal" class="form-control">
                            </div>
                            <div class="form-group col-md-3">
                                <label class="util-form-label">优惠后金额：</label>
                                <input type="number" placeholder="优惠后金额" id="finalAmountTotal" name="finalAmountTotal" class="form-control" readonly>
                            </div>
                            <div class="form-group col-md-3">
                                <label class="util-form-label">本次付款：</label>
                                <input type="number" placeholder="本次付款" id="paymentAmountTotal" name="paymentAmountTotal" class="form-control">
                            </div>
                        </div>
                    </div>

                    <div class="row m-t-sm">
                        <div class=" form-inline">
                            <div class="form-group col-md-3">
                                <label class="util-form-label">结算账户：</label>
                                <select data-placeholder="结算账户" id="settleAccountTotal" name="settleAccountTotal" class="form-control">
                                </select>
                            </div>
                            <div class="form-group col-md-3">
                                <label class="util-form-label">本次欠款：</label>
                                <input type="number" placeholder="本次欠款" id="debtAccountTotal" name="debtAccountTotal" class="form-control" readonly>
                            </div>
                            <div class="form-group col-md-3">
                                <label class="util-form-label small">客户承担费用：</label>
                                <input type="number" placeholder="客户承担费用" id="expenseFeeTotal" name="expenseFeeTotal" class="form-control">
                            </div>
                            <div class="form-group col-md-3">
                                <label class="util-form-label">销售费用：</label>
                                <input type="number" placeholder="销售费用" id="purchaseFeeTotal" name="purchaseFeeTotal" class="form-control" readonly>
                            </div>
                        </div>
                    </div>

                </div>
            </form>
            <div class="ibox-content util-ibox-content row m-n">
                <div class="columns pull-right">
                    <a shiro:hasPermission="po:entry:save" class="btn btn-primary btn-rounded" href="#" onclick="save(1)">保存并新增</a>
                    <a shiro:hasPermission="po:entry:save" class="btn btn-success btn-rounded" href="#" onclick="save()">保存</a>
                    <a shiro:hasPermission="po:entry:save" class="btn btn-warning btn-rounded" href="#" onclick="audit(0)">审核</a>
                    <a shiro:hasPermission="po:entry:save" class="btn btn-info btn-rounded" href="#" onclick="listOrder('/se/order')">历史单据</a>
                    <a shiro:hasPermission="po:entry:save" class="btn btn-default btn-rounded" href="#" onclick="listLog()">操作日志</a>
                </div>
            </div>
        </div>
    </div>
</div>
<!--shiro控制bootstraptable行内按钮看见性 来自bootdo的创新方案 -->
<div>
    <script type="text/javascript">
        var s_edit_h = 'hidden';
        var s_remove_h = 'hidden';
        var s_resetPwd_h = 'hidden';
    </script>
</div>
<div shiro:hasPermission="se:entry:edit">
    <script type="text/javascript">
        s_edit_h = '';
    </script>
</div>
<div shiro:hasPermission="se:entry:remove">
    <script type="text/javascript">
        var s_remove_h = '';
    </script>
</div>
<div shiro:hasPermission="se:entry:resetPwd">
    <script type="text/javascript">
        var s_resetPwd_h = '';
    </script>
</div>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript" src="/js/appjs/se/entry/entry.js"></script>
</body>
</html>